model = Sketchup.active_model
selection = Sketchup.active_model.selection
file=model.path
路径 = File.dirname(file).freeze
文件名 = File.basename(file, '.*')
today = Time.new;
时间后缀= today.strftime("%Y%m%d_%H%M%S");
另存文件名=文件名

另存文件名=另存文件名+'_导出'+时间后缀
另存全名=路径+'/'+另存文件名+'.skp'
entities = model.entities
拟复制组s=[]
for e in entities do
  if ( e.is_a?( Sketchup::ComponentInstance ) || e.is_a?( Sketchup::Group ))
    拟复制组s.push e
  end
end

new_sketchup = Sketchup.file_new
model = Sketchup.active_model
entities = model.entities
group = entities.add_group(拟复制组s)
# group2 = group1.copy
group.name="kk"


status = model.save_copy(另存全名)
